package dt.inlee.system.identifier;

import java.io.Serializable;
import java.util.List;
import dt.inlee.common.exception.FrameworkException;
import dt.inlee.common.util.BaseUtil;
import dt.inlee.common.util.ContextLoaderUtil;

public class SystemIdentifier implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1439336019491417122L;
	private String identifier;
	private List<String> scope;
	private static SystemIdentifier instance;

	/**
	 * 利用单利模式获取一个SystemIdentifier对象
	 * 
	 * @return SystemIdentifier -SystemIdentifier对象
	 * @throws FrameworkException
	 */
	public static synchronized SystemIdentifier getInstance()
			throws FrameworkException {
		if (BaseUtil.isEmpty(instance))
			instance = (SystemIdentifier)ContextLoaderUtil.load("sIdentifier");
		return instance;
	}

	public String getIdentifier() {
		return identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	public List<String> getScope() {
		return scope;
	}

	public void setScope(List<String> scope) {
		this.scope = scope;
	}

}
